package Proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class AdminServiceProxy2 implements InvocationHandler {

    AdminService adminService;
    public AdminServiceProxy2(AdminService adminService)
    {
        this.adminService=adminService;
    }

    @Override
    public Object invoke(Object o, Method method, Object[] objects) throws Throwable {
        System.out.println("--------------begin-------------");
        Object invoke = method.invoke(adminService, objects);
        System.out.println("--------------end-------------");
        return invoke;
    }
}
